package com.zyq.feign;

import com.zyq.common.entity.AclPermission;
import com.zyq.common.entity.AclUser;
import com.zyq.common.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(value = "education-system")
public interface SystemFeign {
    // 1. 查询用户信息
    @GetMapping("/system/user/getUserInfo/{username}")
    Result<AclUser> getUserInfo(@PathVariable("username") String username);

    @RequestMapping("/system/permission/getByUserId/{id}")
    public Result<List<AclPermission>> getPermissionInfo(@PathVariable("id") String id);
}
